package com.linser.gistools.common.entity;

import org.opengis.referencing.crs.CoordinateReferenceSystem;

/**
 * @author: linser
 * @Desc: 投影下拉选项
 * @create: 2024-02-03 11:55
 **/
public class CrsChoiceBoxItem {
    private CoordinateReferenceSystem coordinateReferenceSystem;

    private String preTag;
    public CrsChoiceBoxItem(CoordinateReferenceSystem coordinateReferenceSystem, String preTag){
        this.coordinateReferenceSystem = coordinateReferenceSystem;
        this.preTag = preTag;
    }
    public CrsChoiceBoxItem(CoordinateReferenceSystem coordinateReferenceSystem){
        this.coordinateReferenceSystem = coordinateReferenceSystem;
    }

    public CoordinateReferenceSystem getCoordinateReferenceSystem() {
        return coordinateReferenceSystem;
    }

    public void setCoordinateReferenceSystem(CoordinateReferenceSystem coordinateReferenceSystem) {
        this.coordinateReferenceSystem = coordinateReferenceSystem;
    }
    public String toString(){
        if(this.preTag != null){
            return this.preTag + this.coordinateReferenceSystem.getName().toString();
        }else{
            return  this.coordinateReferenceSystem.getName().toString();
        }
    }
}
